Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Vector Imaging Messages


GXVectorPackageShape

QuickDraw GX sends the GXVectorPackageShape message to translate a shape into a package that is sent to the printing device. You need to override the GXVectorPackageShape message to turn a shape into the appropriate pen commands. Your override of the GXVectorPackageShape message must match the following formal declaration:

OSErr MyVectorPackageShape (gxShape aShape, long penIndex);
aShape
The shape object to be packaged.
penIndex
The index of the pen to use to draw the shape.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The default implementation of the GXRenderPage message for the vector imaging system sends the GXVectorPackageShape message to translate a QuickDraw GX shape into a package and send it to a printing device.

The default implementation of this message does nothing. Your override needs to convert the shape into a series of pen commands and send those commands to your printing device with the GXBufferData or GXWriteData messages.

QuickDraw GX converts high-level shapes such as bitmaps, paths, curves, glyphs, text, and text layout into lower-level vector-type shapes such as polygons, rectangles, and lines. For all shapes, QuickDraw GX color sorts, applies transfer modes if needed, clips them against overlapping shapes, and resolves styles, inks, and transforms. It converts the resultant shape into a lower-level shape, if necessary, and then sends the GXVectorPackageShape message.

Your override of the GXVectorPackageShape message needs to convert the shape sent by QuickDraw GX into a device-specific language such as HPGL. You can also override this message to perform other tasks, such as supporting a preview feature in which data is displayed on the user's screen and written to a file before, or instead of, being sent to the device.

SPECIAL CONSIDERATIONS
You never send the GXVectorPackageShape message yourself.

You always totally override the GXVectorPackageShape message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GXRenderPage message is described on page 4-96.

The GXBufferData message is described on page 4-139.

The GXWriteData message is described on page 4-141.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help